//
// Created by jsjxsy on 2022/9/9.
//
#include <vector>
#include <string>
#include <functional>
#include <iostream>
#include <algorithm>
using namespace std;

vector<string> v1 = {"string1", "abcde"};
bool check_size(const string &s, string::size_type sz) {
  return s.size() >= sz;
}
int main() {
  auto check6 = bind(check_size, std::placeholders::_1, 6);
  string s = "hello";
  bool b1 = check6(s);
  cout << boolalpha << b1 << endl;
  auto wc = find_if(v1.begin(), v1.end(), bind(check_size, std::placeholders::_1, 6));
  cout << *wc << endl;

  auto wc2 = find_if(v1.begin(), v1.end(), check6);
  cout << *wc2 << endl;
  return 0;
}
